package com.controller.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class RibbonController {

    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("/index")
    public String getInfo(){
        String results= restTemplate.getForObject("http://provider-server",String.class);
        System.out.println("返回结果"+results);
        return results;
    }



}
